import sys
from PySide6.QtWidgets import QApplication, QWidget, QCalendarWidget
from PySide6.QtCore import QDate


class CalenderDemo(QWidget):
    def __init__(self):
        super().__init__()
        self.resize(800, 600)

        calender = QCalendarWidget(self)
        # # 默认选中的日期
        # print(calender.selectedDate())
        # 设置默认选中的日期
        calender.setSelectedDate(QDate(2024, 8, 10))
        # 默认选中的日期
        print(calender.selectedDate())
        

        
if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = CalenderDemo()
    window.show()
    sys.exit(app.exec())
